<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>系统管理</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="robots" content="all,follow">
    <!-- Bootstrap CSS-->
    <link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome CSS-->
    <link rel="stylesheet" href="vendor/font-awesome/css/font-awesome.min.css">
    <!-- Fontastic Custom icon font-->
    <link rel="stylesheet" href="css/fontastic.css">
    <!-- theme stylesheet-->
    <link rel="stylesheet" href="css/style.default.css" id="theme-stylesheet">
    <!-- Custom stylesheet - for your changes-->
    <link rel="stylesheet" href="css/custom.css">
    <!-- Favicon-->
    <link rel="shortcut icon" href="img/favicon.ico">
    <!-- Tweaks for older IEs--><!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]-->
  </head>
  <body>
    <div class="page">
     
        
      <div class="page-content d-flex align-items-stretch"> 
        <!-- Side Navbar -->
       
        <div class="content-inner" style="width: 100%;">
          <!-- Page Header-->
         
          <!-- Forms Section-->
          <section class="forms no-padding-top"> 
            <div class="container-fluid">
              <div class="row">
              
                <!-- Form Elements -->
                <div class="col-lg-12" >
                  <div class="card" >
                    <div class="card-close">
                      <div class="dropdown">
                        <button type="button" id="closeCard5" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle"><i class="fa fa-ellipsis-v"></i></button>
                        <div aria-labelledby="closeCard5" class="dropdown-menu dropdown-menu-right has-shadow"><a href="#" class="dropdown-item remove"> <i class="fa fa-times"></i>Close</a><a href="#" class="dropdown-item edit"> <i class="fa fa-gear"></i>Edit</a></div>
                      </div>
                    </div>
                    <div class="card-header d-flex align-items-center">
                      <h3 class="h4">操作</h3>
                    </div>
                    <div class="card-body">
                      <form class="form-horizontal">
                        <div class="form-group row no-padding-bottom">
                          <label class="col-sm-3 form-control-label">缓存管理</label>
                          
                        </div>
                        <div class="line no-margin-top"></div>
                       
                        <div class="form-group row">
                          <div class="col-sm-4 offset-sm-3 no-margin">
                            <button type="button" data-link="/login.spr?method=refreshUser&username=" class="btn btn-primary  refresh" style="margin: 20px;">刷新<strong style="color: red;">当前</strong>用户缓存信息</button>
                            <button type="button" data-link="/login.spr?method=refreshAllUser" class="btn btn-primary  refresh" style="margin: 20px;">刷新<strong style="color: red;">全部</strong>用户缓存信息</button>
                            <button type="button" data-link="/login.spr?method=flushKey&key=attr_land" class="btn btn-primary  refresh" style="margin: 20px;">刷新<strong style="color: red;">土地</strong>配置信息</button>
                            <button type="button" data-link="/login.spr?method=flushKey&key=attr_building" class="btn btn-primary  refresh" style="margin: 20px;">刷新<strong style="color: red;">建筑</strong>配置信息</button>
                          </div>
                        </div>
                        
                        <div class="line"></div>
                      </form>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </section>
         
        </div>
      </div>
    </div>
    <!-- JavaScript files-->
    <script src="vendor/jquery/jquery.min.js"></script>
    <script src="vendor/popper.js/umd/popper.min.js"> </script>
    <script src="vendor/bootstrap/js/bootstrap.min.js"></script>
    <script src="vendor/jquery.cookie/jquery.cookie.js"> </script>
    <script src="vendor/chart.js/Chart.min.js"></script>
    <script src="vendor/jquery-validation/jquery.validate.min.js"></script>
    <!-- Main File-->
    <script src="js/front.js"></script>
    <script type="text/javascript">
    	
    	$(".refresh").bind('click',function(){
    		
    		if(confirm("确认要进行刷新操作吗")){
    			var url = $(this).attr("data-link");
    			$.ajax({
    				type:"get",
    				url:url,
    			contentType:"application/json",
              dataType: "json",
              data:"",
              success:function(data){
              	 var dataObj=eval("("+data+")");

                  if(dataObj.result!="0000"){
                      alert(dataObj.msg);
                  }else{
                  	alert("操作成功！");
                  }
              },
              error:function(){
              	alert("操作失败！");
              }
    				
    				
    			});
    			
    			
    			
    			
    			
    		}
    		
    		
    		
    		
    	});
    	
    </script>
  </body>
</html>